import React, { useEffect } from 'react'
import { Button } from 'antd'
import E from 'wangeditor'

export default function Profile() {
let editor

 useEffect(() => {
   editor = new E('#editor')
    editor.create()
 })
    
  
  const getData = () => {
    if(editor) {
      console.log(editor.txt.html())
    }
  }
    return (
      <div>
        个人中心页面
        个人简介：
        <div id="editor"></div>
        <Button type="primary" onClick={getData}>获取文本内容</Button>
      </div>
    )
}
